#ifndef _CU_FUNCTION_H_
#define _CU_FUNCTION_H_

#define cudaMallocH																						cudaMallocHost
#define cudaMallocD																						cudaMalloc
#define cudaMallocA																						cudaMallocArray

#define cudaFreeH																							cudaFreeHost
#define cudaFreeD																							cudaFree 
#define cudaFreeA																							cudaFreeArray

#define cudaMemcpyAtoA(aDst, aSrc, sizeInBytes)								cudaMemcpyArrayToArray( (aDst), 0,0, (aSrc), 0,0, sizeInBytes, cudaMemcpyDeviceToDevice)

#define cudaMemcpyHtoH(pDst, pSrc,        sizeInBytes)				cudaMemcpy            ( (pDst),        (pSrc), sizeInBytes, cudaMemcpyHostToHost     )
#define cudaMemcpyDtoD(pDst, pSrc,        sizeInBytes)				cudaMemcpy            ( (pDst),        (pSrc), sizeInBytes, cudaMemcpyDeviceToDevice )
#define cudaMemcpyDtoH(pDst, pSrc,        sizeInBytes)				cudaMemcpy            ( (pDst),        (pSrc), sizeInBytes, cudaMemcpyDeviceToHost   )
#define cudaMemcpyHtoD(pDst, pSrc,        sizeInBytes)				cudaMemcpy            ( (pDst),        (pSrc), sizeInBytes, cudaMemcpyHostToDevice   )

#define cudaMemcpyDtoA(aDst, pSrc,        sizeInBytes)				cudaMemcpyToArray     ( (aDst),  0, 0, (pSrc), sizeInBytes, cudaMemcpyDeviceToDevice )
#define cudaMemcpyHtoA(aDst, pSrc,        sizeInBytes)				cudaMemcpyToArray     ( (aDst),  0, 0, (pSrc), sizeInBytes, cudaMemcpyHostToDevice   )
//#define cudaMemcpyDtoA(aDst, pSrc, ox,oy, sizeInBytes)        cudaMemcpyToArray     ( (aDst), ox,oy, (pSrc), sizeInBytes, cudaMemcpyDeviceToDevice )
//#define cudaMemcpyHtoA(aDst, pSrc, ox,oy, sizeInBytes)        cudaMemcpyToArray     ( (aDst), ox,oy, (pSrc), sizeInBytes, cudaMemcpyHostToDevice   )

#define cudaMemcpyAtoD(pDst, aSrc,        sizeInBytes)				cudaMemcpyFromArray   ( (pDst), (aSrc),  0, 0, sizeInBytes, cudaMemcpyDeviceToDevice )
#define cudaMemcpyAtoH(pDst, aSrc,        sizeInBytes)				cudaMemcpyFromArray   ( (pDst), (aSrc),  0, 0, sizeInBytes, cudaMemcpyDeviceToHost   )
//#define cudaMemcpyAtoD(aDst, pSrc, ox,oy, sizeInBytes)				cudaMemcpyFromArray   ( (pDst), (aSrc), ox,oy, sizeInBytes, cudaMemcpyDeviceToDevice )
//#define cudaMemcpyAtoH(aDst, pSrc, ox,oy, sizeInBytes)				cudaMemcpyFromArray   ( (pDst), (aSrc), ox,oy, sizeInBytes, cudaMemcpyDeviceToHost   )

#endif